/*
 * @Description: 
 * @Version: 1.0
 * @Autor: ziwei
 * @Date: 2021-08-13 09:53:05
 * @LastEditors: ziwei
 * @LastEditTime: 2021-08-13 09:57:42
 */
const http = require('http');
const fs = require('fs');
const path = require('path')

//浏览器就是发送http请求的软件
const server = http.createServer((req,res)=>{
  console.log(req.headers);
  res.end(fs.readFileSync(path.resolce(__dirname,'index,html')));
});

server.listen(3000)